import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:sports_new/resources/colours.dart';
import 'package:sports_new/resources/styles.dart';

import '../../../widgets/base/qkd_text.dart';



class MyAppBar extends StatelessWidget implements PreferredSizeWidget {
  const MyAppBar({super.key,
    required this.title,
    this.actions = const []
  });

  final String title;
  final List<Widget> actions;

  @override
  Widget build(BuildContext context) {
    return Styles.appBar(
      title: QkdText(title,fontSize: 17,fontWeight: FontWeight.w500),
      backgroundColor: Colors.transparent,
      foregroundColor: Colors.transparent,
      elevation: 0,
      systemUiOverlayStyle: const SystemUiOverlayStyle(
        statusBarBrightness: Brightness.dark,
        statusBarIconBrightness: Brightness.dark
      ),
      actions: actions,
    );
  }
  
  @override
  Size get preferredSize => const Size(double.infinity, 44);
}